<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p>用户名:<input type="text" onblur="test(this)" id="username"></p>
<p>密码:<input type="text" id="password"></p>
<p>
    性别:<select id="sex" >
            <option value="男">男</option>
            <option value="女">女</option>
        </select>
</p>
<p>学历:
    <select id="education">
        <option value="大专">大专</option>
        <option value="本科">本科</option>
    </select>
</p>
<p>自我介绍:
    <textarea id="desc"></textarea>
</p>
<p><button onclick="submit()">提交</button></p>
<script>
    function test(username) {
        if (username.value != "admin"){
            alert("输入错误 , 请重新输入用户名");
            username.value = "";
        }
    }

    function submit() {
        var str = "";

        str += document.getElementById("username").value
        str += document.getElementById("password").value;
        str += document.getElementById("sex").value;
        str += document.getElementById("education").value;
        str += document.getElementById("desc").value;
        alert(str)
    }
</script>
</body>
</html>